﻿/*
 * Returns a new time at the specified hour, minute and second.
 */
create function [Time].[FromParts] ( @p_Hour int, @p_Minute int, @p_Second int )
returns time as
begin

  return DateAdd( Second, ( @p_Hour * 3600 ) + ( @p_Minute * 60 ) + @p_Second, 0 )

end